package com.example.demo.common;

import lombok.Data;

/**
 * @ClassName：CustomException
 * @Author: admin
 * @Date: 2024/11/28 10:38
 * @Description: 自定义异常
 */
@Data
public class CustomException extends RuntimeException {
    private int code = 0;
    private String message;

    public CustomException(String message) {
        this.message = message;
    }

    public CustomException(String message, int code) {
        this.message = message;
        this.code = code;
    }
}
